package com.lifesting.workflow.diagram.ext;

import org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.AbstractContributionItemProvider;
import org.eclipse.gmf.runtime.common.ui.util.IWorkbenchPartDescriptor;
import org.eclipse.jface.action.IAction;

import com.lifesting.workflow.diagram.ext.action.ViewModelAction;

public class ExtContributionItemProvider extends
		AbstractContributionItemProvider {

	public ExtContributionItemProvider() {
		super();
		System.out.println("INit...");
	}

	@Override
	protected IAction createAction(String actionId,
			IWorkbenchPartDescriptor partDescriptor) {
		if (actionId.equals("viewmodel"))			
		{
			return new ViewModelAction(partDescriptor.getPartPage());
		}
		return super.createAction(actionId, partDescriptor);
	}

}
